{{partial('public/header')}}
<div class="midder">
<div class="mc">

	<div class="cleft">
	 {{partial('index/user_header')}}   	
        <div class="note_list">
        
          {% if !(arrNote is empty)%}
            {% for item in arrNote%}
            <dl>
                <dt><a href="{{url('space/notes/show/'~item.noteid)}}" title="{{item.title}}">{{item.title}}</a><span class="open"><a href="javascript:;">开关</a></span></dt>
                <dd class="addtime">{{date('Y-m-d H:i:s', item.addtime)}}  被 {{item.count_view}} 人浏览</dd>
                <dd class="note_des">{{sub_str(ikhtml_text(item.content),280)}}...&nbsp;<a href="{{url('space/notes/show/'~item.noteid)}}#comment">({{item.count_comment}}回应)</a></dd>
                <dd class="note_imgs">
                    {% set imglist = ikhtml_img('note',item.noteid,item.content) %}
                    {% for imgitem in imglist %}
                    	<a href="javascript:;" title="{{imgitem['title']}}"><img class="big" alt="" src="{{imgitem['simg']}}" bigimg="{{imgitem['bimg']}}" smallimg="{{imgitem['simg']}}" /></a>
                    {% endfor %}
                </dd>
                <dd class="action">
                 {{item.count_view}} 人浏览  &nbsp;&nbsp;
                 <a href="{{url('space/notes/show/'~item.noteid)}}#comments" title="回应">{{item.count_comment}} 条回应</a>
                 {% if item.userid == visitor['userid']%}
                &gt; <a href="{{url('space/notes/edit/'~item.noteid)}}" title="">修改</a> &gt; <a href="{{url('space/notes/delete/'~item.noteid)}}" title="" onClick="return confirm('删除这篇日记吗?')">删除</a>
                 {% endif %}
                </dd>
            </dl>
            {% endfor %}
          {% else %}
              {% if visitor['userid'] == strUser['userid']%}
              <p class="pl f14">你可以在这里记录您日记了，马上就 <a href="{{url('space/notes/create')}}">开始写吧</a> 。</p>
              {% else %}
              <p class="pl f14">这家伙太懒了还没有写过任何日记 。</p>
              {% endif %}
          {% endif %}
        </div>
        		
	 <div class="page">{{pageUrl}}</div>         
		    	
    </div><!--//cleft-->
    <div class="cright">
        {% if visitor['userid'] == strUser['userid'] %}
            <p class="pl2">&gt; <a href="{{url('space/notes/create')}}" class="create-new-album" >开始写日记</a></p>
        {% endif %}
        
		<div class="mod">
	        <h2>
	          	阅读排行
	            &nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·
	    	</h2>
			<ul class="note-list">
            {% if hotNotes%}
            {% for item in hotNotes %} 
            <li><a href="{{url('space/notes/show/'~item['noteid'])}}" title="{{item['title']}}">{{item['title']}}</a></li>
            {% endfor %}
            {% endif %}
            </ul>       
		</div>        
        
    </div><!--//right-->
</div>
</div>
<script language="javascript">
$(function(){
	$('.note_imgs img').bind('click',function(){
		var self = $(this), classname = self.attr('class');
		var smallimg = self.attr('smallimg'),bigimg = self.attr('bigimg');
		if(classname=='big'){
			self.attr('class','small');self.attr('src',bigimg);
		}else{
			self.attr('class','big');self.attr('src',smallimg);
		}
	});
})
</script>